home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / appicon.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-08  |  3.3 KB  |  63 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * AAppIcon wrapper class                                                    *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_AppIcon_H
  12. #define ASAP_AppIcon_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <Proto/WB.h>
  19. }
  20.  
  21. class AAppIcon : public AppIcon
  22. {
  23.  public:
  24.  inline static AAppIcon * AddAppIcon(unsigned long id, unsigned long userdata, UBYTE * text, MsgPort * msgport, FileLock * lock, DiskObject * diskobj, Tag tag1, ...);
  25.  inline void * operator new (size_t, unsigned long id, unsigned long userdata, UBYTE * text, MsgPort * msgport, FileLock * lock, DiskObject * diskobj, Tag tag1, ...);
  26.  inline static AAppIcon * AddAppIconA(unsigned long id, unsigned long userdata, UBYTE * text, MsgPort * msgport, FileLock * lock, DiskObject * diskobj, TagItem * taglist);
  27.  inline void * operator new (size_t, unsigned long id, unsigned long userdata, UBYTE * text, MsgPort * msgport, FileLock * lock, DiskObject * diskobj, TagItem * taglist);
  28.  inline BOOL RemoveAppIcon();
  29.  inline void operator delete (void *);
  30. };
  31. //----------------------------------------------------------------------------
  32. AAppIcon * AAppIcon::AddAppIcon (unsigned long id, unsigned long userdata, UBYTE * text, MsgPort * msgport, FileLock * lock, DiskObject * diskobj, Tag tag1, ...)
  33. {
  34.  return AAppIcon::AddAppIconA(id, userdata, text, msgport, lock, diskobj, (TagItem *) &tag1);
  35. }
  36. //----------------------------------------------------------------------------
  37. void * AAppIcon::operator new (size_t, unsigned long id, unsigned long userdata, UBYTE * text, MsgPort * msgport, FileLock * lock, DiskObject * diskobj, Tag tag1, ...)
  38. {
  39.  return AAppIcon::AddAppIconA(id, userdata, text, msgport, lock, diskobj, (TagItem *) &tag1);
  40. }
  41. //----------------------------------------------------------------------------
  42. AAppIcon * AAppIcon::AddAppIconA (unsigned long id, unsigned long userdata, UBYTE * text, MsgPort * msgport, FileLock * lock, DiskObject * diskobj, TagItem * taglist)
  43. {
  44.  return (AAppIcon *) ::AddAppIconA(id, userdata, text, msgport, lock, diskobj, taglist);
  45. }
  46. //----------------------------------------------------------------------------
  47. void * AAppIcon::operator new (size_t, unsigned long id, unsigned long userdata, UBYTE * text, MsgPort * msgport, FileLock * lock, DiskObject * diskobj, TagItem * taglist)
  48. {
  49.  return AAppIcon::AddAppIconA(id, userdata, text, msgport, lock, diskobj, taglist);
  50. }
  51. //----------------------------------------------------------------------------
  52. BOOL AAppIcon::RemoveAppIcon ()
  53. {
  54.  return ::RemoveAppIcon(this);
  55. }
  56. //----------------------------------------------------------------------------
  57. void AAppIcon::operator delete (void *appIcon)
  58. {
  59.  ((AAppIcon *) appIcon)->RemoveAppIcon();
  60. }
  61.  
  62. #endif
  63.